package com.multicampus.minishop.view.product;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.multicampus.minishop.framework.Action;
import com.multicampus.minishop.product.vo.ProductVO;
import com.multicampus.minishop.services.product.ProductService;
import com.multicampus.minishop.services.product.impl.ProductServiceImpl;

public class ShowDetailProductAction extends Action{

	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		
		int prodNo= Integer.parseInt(request.getParameter("prodNo"));
		System.out.println(prodNo);
		ProductService service=new ProductServiceImpl();
		ProductVO vo=service.getProduct(prodNo);
		System.out.println(vo);
		request.setAttribute("vo", vo);
		
		return "forward:/product/ProductDetailInform.jsp";
		
	}
	
	
}
